﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TB_CS.ID_Manage
{
    public partial class Change_Password : Form
    {
        public Change_Password()
        {
            InitializeComponent();
        }

        private void Change_Password_Load(object sender, EventArgs e)
        {
            label2.Text = Class.SysInfo.S_User_Name;

        }

        private void button1_Click(object sender, EventArgs e)
        {
            if(textBox1.Text.Trim().ToString()==
                textBox2.Text.Trim().ToString())
            {
                //可以更新
                Class.SysInfo.WSSUSER.UPDATE_USER_PWD(Convert.ToInt32(Class.SysInfo.INFO_Seller_ID),
                    Class.SysInfo.S_User_Name, textBox1.Text.Trim().ToString());
                MessageBox.Show("密码修改成功，即将重启软件", "Success");
                Application.Restart();
            }
            else
            {
                MessageBox.Show("两次输入的密码不一致，请重试");
                textBox1.Text = "";
                textBox2.Text = "";
                textBox1.Focus();
            }
        }
    }
}
